package com.aidex.biz.domain;

import com.aidex.common.annotation.Excel;
import com.aidex.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 订单对象 biz_order
 * @author sean
 * @email 2074844820@qq.com
 * @date 2023-07-02
 */
@Data
public class Order extends BaseEntity<Order>
{
    private static final long serialVersionUID = 1L;



    /** 用户ID */
    @Excel(name = "用户ID")
    private String userInfoId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderId;

    /** 订单类型 0 洗护订单 1 商城订单 */
    private String orderType;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payDate;

    /** 支付时间开始 */
    private String beginPayDate;

    /** 支付时间结束 */
    private String endPayDate;
    /** 订单金额 */
    private BigDecimal amount;

    /** 电话号码 */
    private String phone;



    /** 是否使用优惠券1不使用 2使用 */
    private Integer isVoucher;

    /** 优惠券面值 */
    private BigDecimal voucherPrice;

    /** 用户领取优惠券ID */
    private String voucherId;

    /** 1上门取 2自行投放 */
    private String orderInType;

    /** 1不保价 2 保价 */
    private Integer isInsure;

    /** 保价金额 */
    private BigDecimal insurePrice;

    /** 声明价格 */
    private BigDecimal declarePrice;

    /** 上门地址 */
    private String roomAddress;

    /** 收货人 */
    private String lianxiName;

    /** 支付金额 */
    private BigDecimal payAmount;

    /** 折后价格或者支付金额 */
    private BigDecimal saleAmount;

    /** 支付状态 0 待支付 1已支付 */
    private Integer payStatus;

    /** 售后单状态 */
    private Integer refundStatus;

    /** 排序 */
    private Integer sort;

    /**
     * 微信支付流水号
     */
    private String wxPayNo;

    /**
     * 轻氧取件单号
     */
    private String deliveryNo;
    /**
     * 轻氧送件单号
     */
    private String receiveNo;

    /**
     * 轻氧订单号
     */
    private String qingyangOrderId;

    private UserInfo userInfo;

    private List<OrderDetails> orderDetails;

    /**
     * 上门时间
     */

    private String visitEndTime;
    private String visitBeginTime;

    /**
     * 上门日期
     */
    private String day;

    /**
     * 提交订单需要的参数
     */
    /**
     * 提交的cartIds
     */
    private String cartsIds;



    /** 状态
     洗护订单
     -1 待支付
     0 已支付
     1 进行中
     2 已完成
     -99售后单

     商城订单 -1待支付 0 已支付 1 进行中  2已完成 -99售后单

     */
    private String status;
    /**
     * 物流单号
     */
    private String logisticsNo;
    /**
     * 物流状态
     */
    private String logisticsStatus;

    /**
     * 是否出账单
     */
    private String isBill;


    private String isCompanyId;

    /**京东查询今天的订单**/
    private String time;


    public void setUserInfoId(String userInfoId)
    {
        this.userInfoId = userInfoId;
    }

    public String getUserInfoId()
    {
        return userInfoId;
    }

    public void setOrderId(String orderId)
    {
        this.orderId = orderId;
    }

    public String getOrderId()
    {
        return orderId;
    }

    public void setOrderType(String orderType)
    {
        this.orderType = orderType;
    }

    public String getOrderType()
    {
        return orderType;
    }

    public void setPayDate(Date payDate)
    {
        this.payDate = payDate;
    }

    public Date getPayDate()
    {
        return payDate;
    }

    public void setAmount(BigDecimal amount)
    {
        this.amount = amount;
    }

    public BigDecimal getAmount()
    {
        return amount;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }



    public void setIsVoucher(Integer isVoucher)
    {
        this.isVoucher = isVoucher;
    }

    public Integer getIsVoucher()
    {
        return isVoucher;
    }

    public void setVoucherPrice(BigDecimal voucherPrice)
    {
        this.voucherPrice = voucherPrice;
    }

    public BigDecimal getVoucherPrice()
    {
        return voucherPrice;
    }

    public void setVoucherId(String voucherId)
    {
        this.voucherId = voucherId;
    }

    public String getVoucherId()
    {
        return voucherId;
    }

    public void setOrderInType(String orderInType)
    {
        this.orderInType = orderInType;
    }

    public String getOrderInType()
    {
        return orderInType;
    }

    public void setIsInsure(Integer isInsure)
    {
        this.isInsure = isInsure;
    }

    public Integer getIsInsure()
    {
        return isInsure;
    }

    public void setInsurePrice(BigDecimal insurePrice)
    {
        this.insurePrice = insurePrice;
    }

    public BigDecimal getInsurePrice()
    {
        return insurePrice;
    }

    public void setDeclarePrice(BigDecimal declarePrice)
    {
        this.declarePrice = declarePrice;
    }

    public BigDecimal getDeclarePrice()
    {
        return declarePrice;
    }

    public void setRoomAddress(String roomAddress)
    {
        this.roomAddress = roomAddress;
    }

    public String getRoomAddress()
    {
        return roomAddress;
    }

    public void setLianxiName(String lianxiName)
    {
        this.lianxiName = lianxiName;
    }

    public String getLianxiName()
    {
        return lianxiName;
    }

    public void setPayAmount(BigDecimal payAmount)
    {
        this.payAmount = payAmount;
    }

    public BigDecimal getPayAmount()
    {
        return payAmount;
    }

    public void setSaleAmount(BigDecimal saleAmount)
    {
        this.saleAmount = saleAmount;
    }

    public BigDecimal getSaleAmount()
    {
        return saleAmount;
    }

    public void setPayStatus(Integer payStatus)
    {
        this.payStatus = payStatus;
    }

    public Integer getPayStatus()
    {
        return payStatus;
    }

    public void setRefundStatus(Integer refundStatus)
    {
        this.refundStatus = refundStatus;
    }

    public Integer getRefundStatus()
    {
        return refundStatus;
    }

    public void setSort(Integer sort)
    {
        this.sort = sort;
    }

    public Integer getSort()
    {
        return sort;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("userId", getUserId())
                .append("deptId", getDeptId())
                .append("userName", getUserName())
                .append("deptName", getDeptName())
                .append("companyId", getCompanyId())
                .append("userInfoId", getUserInfoId())
                .append("orderId", getOrderId())
                .append("orderType", getOrderType())
                .append("payDate", getPayDate())
                .append("amount", getAmount())
                .append("phone", getPhone())

                .append("isVoucher", getIsVoucher())
                .append("voucherPrice", getVoucherPrice())
                .append("voucherId", getVoucherId())
                .append("orderInType", getOrderInType())
                .append("isInsure", getIsInsure())
                .append("insurePrice", getInsurePrice())
                .append("declarePrice", getDeclarePrice())
                .append("roomAddress", getRoomAddress())
                .append("lianxiName", getLianxiName())
                .append("payAmount", getPayAmount())
                .append("saleAmount", getSaleAmount())
                .append("payStatus", getPayStatus())
                .append("refundStatus", getRefundStatus())
                .append("sort", getSort())
                .append("status", getStatus())
                .append("remark", getRemark())
                .append("id", getId())
                .append("createBy", getCreateBy())
                .append("createDept", getCreateDept())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("updateIp", getUpdateIp())
                .append("version", getVersion())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
